package com.doucat.doucatmath.fragment;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.ViewGroup;

import com.doucat.doucatmath.R;
import com.doucat.doucatmath.view.Fx;
import com.doucat.doucatmath.view.FxImageView;
import com.doucat.support.component.fragment.base.BaseFragment;

/**
 * -----------------------------------------------------------------
 * Copyright (C) 2021-2031, by tonly, All rights reserved.
 * -----------------------------------------------------------------
 * File: QuadraticFragment.java
 * Author: wangfy
 * Create: 2021/7/28 15:19
 */
public class QuadraticFragment extends BaseFragment {
    private FxImageView imvFx;
    @Override
    public void onRootViewCreate(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        setBaseFragmentContentView(R.layout.fragment_quadratic);
        imvFx=findViewById(R.id.imvFx);
        imvFx.setFx(new Fx() {
            @Override
            public double fx(double x) {
                return 2*x*x+2*x-3;
            }
        });
    }
}